<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
<script>
let fund = 10000   
let save
let withdraw
let i
let saveMoney
let withdrawMoney
while(i= prompt('1.查询余额   2.存钱   3.取款   4.退出')){
switch(i){
    
    case '1':
        alert(fund)
    break;
    case '2':
        save = +prompt('存多少?')
        fund+=save
        saveMoney = fund
        alert(saveMoney)
    break;
    case '3':
        withdraw = +prompt('你要取多少钱?')
        saveMoney = fund
        fund -= withdraw
        withdrawMoney = fund - withdraw
        alert(withdrawMoney)
    break;
    case '4':
    alert('退出成功，欢迎下次光临')
    exit
}
}
</script>
</body>
</html>